Release 10.1A: OpenEdge Development:
Programming Interfaces
Implementing a 4GL socket server
This section describes how to implement a 4GL socket server.
![]()
To implement a socket server:
- Create a server socket object using the
CREATESERVER-SOCKETstatement.Note:- Enable the server socket to listen for connections using the
ENABLE-CONNECTIONS( )method. This assigns the socket to a specified TCP/IP port on which Progress listens and accepts connection requests.ENABLE-CONNECTIONS()also lets you set the length of the pending-connection queue. For more information, see the reference entry for theENABLE-CONNECTION()method in the OpenEdge Development: Progress 4GL Reference .- Specify a
CONNECTevent procedure using theSET-CONNECT-PROCEDURE( )method.- Wait for
CONNECTevents using a blocking I/O statement or poll forCONNECTevents using thePROCESS EVENTSstatement.Once you have a connection established from a client, you can read data from and write data to the client on the connection. You can also manage the server socket that you have enabled for listening.
The following sections describe these steps in more detail.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |